FROM maven:3.5-jdk-8-alpine as build-stage

WORKDIR /app
COPY . .
COPY deployment/settings.xml /usr/share/maven/conf/settings.xml

RUN mvn clean package -Dmaven.test.skip=true

FROM java:8

ENV TZ=Asia/Shanghai

COPY --from=build-stage /app/association-adminAPI/target/club-admin-*.jar app.jar

ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]